<?php
class Hydrum_Application_Resource_Pathfinder extends Zend_Application_Resource_ResourceAbstract
{

    /**
     * Enter description here ...
     * @var Hydrum_Application_Pathfinder
     */
    protected $_pathfinder;

    public function init()
    {
        return $this->getPathfinder();
    }

    protected function getPathfinder()
    {
        if ($this->_pathfinder == null) {

            $applications = $this
                ->getBootstrap()
                    ->getOption('applications');

            $applications = array_reverse($applications);

            $this->_pathfinder = new Hydrum_Pathfinder($applications);
        }

        return $this->_pathfinder;
    }
}
